package com.jack.lib.core.ext

import java.lang.reflect.ParameterizedType

/**
 * author : chong.huang
 * create : 2022/1/3
 * desc   :
 */
fun Class<Any>.arguments(index: Int) =  (this.genericSuperclass as ParameterizedType).actualTypeArguments[index] as Class<*>

fun Any.arguments(index: Int) =  (this::class.java.genericSuperclass as ParameterizedType).actualTypeArguments[index] as Class<*>
